Fast Exchange Sorts 1
نویسندگان
چکیده
We present three variations of the following new sorting theme: Throughout the sort, the array is maintained in piles of sorted elements. At each step, the piles are split into two parts, so that the elements of the left piles are smaller than (or equal to) the elements of the right piles. Then, the two parts are each sorted, recursively. The theme, then, is a combination of Hoare's Quicksort idea, and the Pick algorithm, by Blum, et al., for linear selection. The variations arise from the possible choices of splitting method. Two variations attempt to minimize the average number of comparisons. The better of these has an average performance of 1:075n lg n comparisons. The third variation sacriices the average case for a worst-case performance of 1:756n lg n, which is better than Heapsort. They all require minimal extra space and about as many data moves as comparisons.
منابع مشابه
Fast and Feasible Periodic Sorting Networks of Constant Depth
A periodic comparator network has depth (or period) k, if for every t > k, the compare-exchange operations performed at step t are executed between exactly the same registers as at step t k. We introduce a general method that converts an arbitrary comparator network that sorts n items in time T(n) and that has layout area A into a periodic sorting network of depth 5 that sorts O(n .T(n)) items ...
متن کاملDATA VIEWS, DATA RECOGNITION, DESIGN QUERIES AND DESIGN RULES Representational flexibility for design
Sorts present a constructive approach to representational structures and provide a uniform approach to handling various design data. In this way, sorts offer support for multiple, alternative data views and for data exchange between these views. The representation of sorts extends on a maximal element representation for shapes that supports shape recognition and shape rules. In the same way, so...
متن کاملAsymptotic normality and combinatorial aspects of the prefix exchange distance distribution
The prefix exchange distance of a permutation is the minimum number of exchanges involving the leftmost element that sorts the permutation. We give new combinatorial proofs of known results on the distribution of the prefix exchange distance for a random uniform permutation. We also obtain expressions for the mean and the variance of this distribution, and finally, we show that the normalised p...
متن کاملAlgorithm and Hardware for a Merge Sort Using Multiple Processors
An algorithm is described that allows log ( n ) processors to sort n records in just over 2n write cycles, together with suitable hardware to support the algorithm. The algorithm is a parallel version of the straight merge sort. The passes of the merge sort are run overlapped, with each pass supported by a separate processor. The intermediate files of a serial merge sort are replaced by first-i...
متن کاملJurisprudence and the Problem of Church Doctrine
Mormons frequently refer to “Church Doctrine” in their theological discussions. For example, Sister Smith might express her belief that the earth is no more than five or six thousand years old and that the theory of evolution is a Satanically inspired plot. Brother Young responds by noting, “Those are just your opinions. That is not Church Doctrine.” Whatever else the term Church Doctrine might...
متن کامل